home *** CD-ROM | disk | FTP | other *** search
- global glocv1, gloch1, x1, x2, y1, y2, high1, haba1, ga
-
- on pushButton
- repeat while stillDown()
- if rollOver(clickOn()) then
- case ga of
- "D1":
- set cname to "scrld"
- set the memberNum of sprite 45 to 43
- testd1()
- "U1":
- set cname to "scrlu"
- set the memberNum of sprite 44 to 41
- testu1()
- end case
- else
- set the memberNum of sprite 45 to 42
- set the memberNum of sprite 44 to 40
- end if
- updateStage()
- end repeat
- end
-
- on testd1
- if (glocv1 >= y1) and (glocv1 <= y2) then
- set glocv1 to glocv1 + 4
- if glocv1 > y2 then
- set glocv1 to y2
- end if
- set the rect of sprite 2 to rect(gloch1, glocv1, gloch1 + haba1, glocv1 + high1)
- else
- end if
- end
-
- on testu1
- if (glocv1 >= y1) and (glocv1 <= y2) then
- set glocv1 to glocv1 - 4
- if glocv1 < y1 then
- set glocv1 to y1
- end if
- set the rect of sprite 2 to rect(gloch1, glocv1, gloch1 + haba1, glocv1 + high1)
- else
- end if
- end
-